define(function (require) {
    var TVUI = window.TVUI || require('tvui'),
        model = require('model'),
        $ = TVUI.$,
        param = TVUI.Util.queryToJson(location.search);
    
    new TVUI.Page({name: 'femaleWorkersArticle'});

    var femaleWorkersArticle = {
        //列表限制字数
        listTitleLength: 30,
        init: function () {
            this.renderUI();
        },
        renderUI: function () {
            var self = this;
            model.findMediaContents({contentId: param.id}).done(function (res) {
                $('#title').html(res.data.content.title || '');
                $('#time').html('日期：' + TVUI.Util.date(res.data.content.publishTime, 'yyyy-MM-dd') || '');
                $('#article').html(res.data.text.text || '暂无相关内容。');
                self.setPanel();
            });
        },
        setPanel: function () {
            new TVUI.ScrollBar({
                view: '#articleView',
                content: '#articleCon',
                track: '#scrollBar',
                handle: '#handle',
                active: false
            });
        }
    };

    femaleWorkersArticle.init();
});